estuary-client
EstuaryClient - JavaScript client for estuary-client This is the API for the Estuary application. This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.0.0
- Package version: 1.0.6
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen For more information, please visit https://docs.estuary.tech/feedback
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install estuary-client --save
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix['Authorization'] = "Token"
var api = new EstuaryClient.AdminApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.adminMinersGet(callback);
Documentation for API Endpoints
All URIs are relative to //api.estuary.tech/
Class | Method | HTTP request | Description |
---|---|---|---|
EstuaryClient.AdminApi | adminMinersGet | GET /admin/miners/ | Get all miners |
EstuaryClient.AdminApi | adminPeeringPeersDelete | DELETE /admin/peering/peers | Remove peers on Peering Service |
EstuaryClient.AdminApi | adminPeeringPeersGet | GET /admin/peering/peers | List all Peering peers |
EstuaryClient.AdminApi | adminPeeringPeersPost | POST /admin/peering/peers | Add peers on Peering Service |
EstuaryClient.AdminApi | adminPeeringStartPost | POST /admin/peering/start | Start Peering |
EstuaryClient.AdminApi | adminPeeringStatusGet | GET /admin/peering/status | Check Peering Status |
EstuaryClient.AdminApi | adminPeeringStopPost | POST /admin/peering/stop | Stop Peering |
EstuaryClient.AdminApi | adminSystemConfigGet | GET /admin/system/config | Get systems(estuary/shuttle) config |
EstuaryClient.AdminApi | adminUsersGet | GET /admin/users | Get all users |
EstuaryClient.AutoretrieveApi | adminAutoretrieveInitPost | POST /admin/autoretrieve/init | Register autoretrieve server |
EstuaryClient.AutoretrieveApi | adminAutoretrieveListGet | GET /admin/autoretrieve/list | List autoretrieve servers |
EstuaryClient.AutoretrieveApi | autoretrieveHeartbeatPost | POST /autoretrieve/heartbeat | Marks autoretrieve server as up |
EstuaryClient.CollectionsApi | collectionsColuuidCommitPost | POST /collections/{coluuid}/commit | Produce a CID of the collection contents |
EstuaryClient.CollectionsApi | collectionsColuuidContentsDelete | DELETE /collections/{coluuid}/contents | Deletes a content from a collection |
EstuaryClient.CollectionsApi | collectionsColuuidDelete | DELETE /collections/{coluuid} | Deletes a collection |
EstuaryClient.CollectionsApi | collectionsColuuidGet | GET /collections/{coluuid} | Get contents in a collection |
EstuaryClient.CollectionsApi | collectionsColuuidPost | POST /collections/{coluuid} | Add contents to a collection |
EstuaryClient.CollectionsApi | collectionsFsAddPost | POST /collections/fs/add | Add a file to a collection |
EstuaryClient.CollectionsApi | collectionsGet | GET /collections/ | List all collections |
EstuaryClient.CollectionsApi | collectionsPost | POST /collections/ | Create a new collection |
EstuaryClient.ContentApi | adminInvitesCodePost | POST /admin/invites/{code} | Create an Estuary invite |
EstuaryClient.ContentApi | adminInvitesGet | GET /admin/invites | Get Estuary invites |
EstuaryClient.ContentApi | contentAddCarPost | POST /content/add-car | Add Car object |
EstuaryClient.ContentApi | contentAddIpfsPost | POST /content/add-ipfs | Add IPFS object |
EstuaryClient.ContentApi | contentAddPost | POST /content/add | Add new content |
EstuaryClient.ContentApi | contentAggregatedContentGet | GET /content/aggregated/{content} | Get aggregated content stats |
EstuaryClient.ContentApi | contentAllDealsGet | GET /content/all-deals | Get all deals for a user |
EstuaryClient.ContentApi | contentBwUsageContentGet | GET /content/bw-usage/{content} | Get content bandwidth |
EstuaryClient.ContentApi | contentContentsGet | GET /content/contents | Get user contents |
EstuaryClient.ContentApi | contentCreatePost | POST /content/create | Add a new content |
EstuaryClient.ContentApi | contentDealsGet | GET /content/deals | Content with deals |
EstuaryClient.ContentApi | contentEnsureReplicationDatacidGet | GET /content/ensure-replication/{datacid} | Ensure Replication |
EstuaryClient.ContentApi | contentFailuresContentGet | GET /content/failures/{content} | List all failures for a content |
EstuaryClient.ContentApi | contentIdGet | GET /content/{id} | Content |
EstuaryClient.ContentApi | contentListGet | GET /content/list | List all pinned content |
EstuaryClient.ContentApi | contentStagingZonesGet | GET /content/staging-zones | Get staging zone for user, excluding its contents |
EstuaryClient.ContentApi | contentStagingZonesStagingZoneContentsGet | GET /content/staging-zones/{staging_zone}/contents | Get contents for a staging zone |
EstuaryClient.ContentApi | contentStagingZonesStagingZoneGet | GET /content/staging-zones/{staging_zone} | Get staging zone without its contents field populated |
EstuaryClient.ContentApi | contentStatsGet | GET /content/stats | Get content statistics |
EstuaryClient.ContentApi | contentStatusIdGet | GET /content/status/{id} | Content Status |
EstuaryClient.DealsApi | dealEstimatePost | POST /deal/estimate | Estimate the cost of a deal |
EstuaryClient.DealsApi | dealInfoDealidGet | GET /deal/info/{dealid} | Get Deal Info |
EstuaryClient.DealsApi | dealProposalPropcidGet | GET /deal/proposal/{propcid} | Get Proposal |
EstuaryClient.DealsApi | dealQueryMinerGet | GET /deal/query/{miner} | Query Ask |
EstuaryClient.DealsApi | dealStatusByProposalPropcidGet | GET /deal/status-by-proposal/{propcid} | Get Deal Status by PropCid |
EstuaryClient.DealsApi | dealStatusMinerPropcidGet | GET /deal/status/{miner}/{propcid} | Deal Status |
EstuaryClient.DealsApi | dealTransferInProgressGet | GET /deal/transfer/in-progress | Transfer In Progress |
EstuaryClient.DealsApi | dealTransferStatusPost | POST /deal/transfer/status | Transfer Status |
EstuaryClient.DealsApi | dealsFailuresGet | GET /deals/failures | Get storage failures for user |
EstuaryClient.DealsApi | dealsMakeMinerPost | POST /deals/make/{miner} | Make Deal |
EstuaryClient.DealsApi | dealsStatusDealGet | GET /deals/status/{deal} | Get Deal Status |
EstuaryClient.DealsApi | publicDealsFailuresGet | GET /public/deals/failures | Get storage failures |
EstuaryClient.DealsApi | publicMinersStorageQueryMinerGet | GET /public/miners/storage/query/{miner} | Query Ask |
EstuaryClient.DefaultApi | viewerGet | GET /viewer | Fetch viewer details |
EstuaryClient.MetricsApi | publicMetricsDealsOnChainGet | GET /public/metrics/deals-on-chain | Get deal metrics |
EstuaryClient.MinerApi | minerClaimMinerGet | GET /miner/claim/{miner} | Get Claim Miner Message |
EstuaryClient.MinerApi | minerClaimPost | POST /miner/claim | Claim Miner |
EstuaryClient.MinerApi | minerSetInfoMinerPut | PUT /miner/set-info/{miner} | Set Miner Info |
EstuaryClient.MinerApi | minerSuspendMinerPost | POST /miner/suspend/{miner} | Suspend Miner |
EstuaryClient.MinerApi | minerUnsuspendMinerPut | PUT /miner/unsuspend/{miner} | Unuspend Miner |
EstuaryClient.MinerApi | publicMinersDealsMinerGet | GET /public/miners/deals/{miner} | Get all miners deals |
EstuaryClient.MinerApi | publicMinersStatsMinerGet | GET /public/miners/stats/{miner} | Get miner stats |
EstuaryClient.NetApi | adminMinersGet | GET /admin/miners/ | Get all miners |
EstuaryClient.NetApi | publicMinersFailuresMinerGet | GET /public/miners/failures/{miner} | Get all miners |
EstuaryClient.NetApi | publicNetAddrsGet | GET /public/net/addrs | Net Addrs |
EstuaryClient.NetApi | publicNetPeersGet | GET /public/net/peers | Net Peers |
EstuaryClient.PinningApi | pinningPinsGet | GET /pinning/pins | List all pin status objects |
EstuaryClient.PinningApi | pinningPinsPinidDelete | DELETE /pinning/pins/{pinid} | Delete a pinned object |
EstuaryClient.PinningApi | pinningPinsPinidGet | GET /pinning/pins/{pinid} | Get a pin status object |
EstuaryClient.PinningApi | pinningPinsPinidPost | POST /pinning/pins/{pinid} | Replace a pinned object |
EstuaryClient.PinningApi | pinningPinsPost | POST /pinning/pins | Add and pin object |
EstuaryClient.PublicApi | getCidGet | GET /get/{cid} | Get Full Content by Cid |
EstuaryClient.PublicApi | publicByCidCidGet | GET /public/by-cid/{cid} | Get Content by Cid |
EstuaryClient.PublicApi | publicInfoGet | GET /public/info | Get public node info |
EstuaryClient.PublicApi | publicMetricsDealsOnChainGet | GET /public/metrics/deals-on-chain | Get deal metrics |
EstuaryClient.PublicApi | publicMinersDealsMinerGet | GET /public/miners/deals/{miner} | Get all miners deals |
EstuaryClient.PublicApi | publicMinersFailuresMinerGet | GET /public/miners/failures/{miner} | Get all miners |
EstuaryClient.PublicApi | publicMinersStatsMinerGet | GET /public/miners/stats/{miner} | Get miner stats |
EstuaryClient.PublicApi | publicNetAddrsGet | GET /public/net/addrs | Net Addrs |
EstuaryClient.PublicApi | publicNetPeersGet | GET /public/net/peers | Net Peers |
EstuaryClient.PublicApi | publicStatsGet | GET /public/stats | Public stats |
EstuaryClient.UserApi | userApiKeysGet | GET /user/api-keys | Get API keys for a user |
EstuaryClient.UserApi | userApiKeysKeyOrHashDelete | DELETE /user/api-keys/{key_or_hash} | Revoke a User API Key. |
EstuaryClient.UserApi | userApiKeysPost | POST /user/api-keys | Create API keys for a user |
EstuaryClient.UserApi | userExportGet | GET /user/export | Export user data |
EstuaryClient.UserApi | userStatsGet | GET /user/stats | Get stats for the current user |
Documentation for Models
- EstuaryClient.AddressAddress
- EstuaryClient.ApiChannelIDParam
- EstuaryClient.ApiClaimMsgResponse
- EstuaryClient.ApiClaimResponse
- EstuaryClient.ApiCreateCollectionBody
- EstuaryClient.ApiDeleteContentFromCollectionBody
- EstuaryClient.ApiEmptyResp
- EstuaryClient.ApiEstimateDealBody
- EstuaryClient.ApiGetApiKeysResp
- EstuaryClient.ApiMinerResp
- EstuaryClient.ApiPublicNodeInfo
- EstuaryClient.AutoretrieveInitBody
- EstuaryClient.CidCid
- EstuaryClient.CollectionsCidType
- EstuaryClient.CollectionsCollection
- EstuaryClient.CollectionsCollectionListResponse
- EstuaryClient.ContentAddBody
- EstuaryClient.MinerClaimMinerBody
- EstuaryClient.MinerMinerChainInfo
- EstuaryClient.MinerMinerSetInfoParams
- EstuaryClient.MinerSuspendMinerBody
- EstuaryClient.PeeringPeeringPeer
- EstuaryClient.TypesIpfsListPinStatusResponse
- EstuaryClient.TypesIpfsPin
- EstuaryClient.TypesIpfsPinStatusResponse
- EstuaryClient.TypesPinningStatus
- EstuaryClient.UtilContentAddResponse
- EstuaryClient.UtilContentCreateBody
- EstuaryClient.UtilContentType
- EstuaryClient.UtilDbCID
- EstuaryClient.UtilHttpError
- EstuaryClient.UtilUserSettings
- EstuaryClient.UtilViewerResponse
Documentation for Authorization
bearerAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header